#ifndef MY_DEF_HPP
#define MY_DEF_HPP

#pragma once

#include <QString>

typedef unsigned char	uint8;	//无符号char
typedef char			sint8;	//有符号char
typedef unsigned short	uint16;	//无符号short
typedef short			sint16;	//有符号short
typedef unsigned int	uint32;	//无符号32位
typedef int				sint32;	//有符号32位

///机器人位置定义，也用做其它定义，
typedef struct _ROBOTPOS_
{
    double x;
    double y;
    double z;
    double rx;
    double ry;
    double rz;
    double Ext[4];      //预留3个外部轴存储空间
}ROBOTPOS;



#define _SUCCESS (0)
#define _ERROR	(-1)


typedef struct _TASK
{
    QString     task_name;                  //任务名
    QString     task_note;                  //任务备注
    uint32_t    sensor_laser_mode;          //激光传感器模式
    uint32_t    snesor_exposure_time;       //激光传感器曝光时间，min：10 max：2000
    uint32_t    tool_angle_of_inclina;      //打磨头倾斜角
    float       rough_grinding_amount;      //粗磨单次打磨量
    float       fine_grinding_amount;       //精磨单次打磨量
    float       remaining_amount;           //打磨后余量
    float       tool_width;                 //刀具宽度
    float       robot_move_speed;           //机器人移动速度
}TASK;

typedef struct _scmd_write
{
    uint32_t cmd_type;
    QString cmd_data;
    uint32_t send_cnt;
}scmd_write;

//消息等级
typedef enum _MESSAGE_LEVEL
{
    debug,
    warning
}MESSAGE_LEVEL;


typedef enum _LANGUAGE_
{
    chinese,
    english
}LANGUAGE;


#endif // MY_DEF_HPP
